#include<bits/stdc++.h>

using namespace std;

template<typename T=int>
inline T read() {
    T x;
    cin >> x;
    return x;
}

int main() {
    vector<int> v = {read(), read(), read()};
    sort(v.begin(), v.end());
    cout << v.front() << " " << v.back() << endl;
    return 0;
}